#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <MyLibrary.au3>
#include <String.au3>
#include <Date.au3>
#include <array.au3>
#Include <Misc.au3>

HotkeySet("{ESC}","terminate")

Opt("WinTitleMatchMode", 4)

GUICreate("TEST", 250, 250,0,0,-1,$WS_EX_TOPMOST)
 
GUICtrlCreateLabel("Facing:", 5,5, 95, 50)
dim $ctrlfacing = GUICtrlCreateLabel("0", 80,5, 70, 18 )

GUICtrlCreateLabel("Distance:", 5, 25, 95, 50)
dim $ctrldistance = GUICtrlCreateLabel("0", 80, 25, 70, 18 )

GUICtrlCreateLabel("Test:", 5, 50, 95, 50)
dim $ctrltest = GUICtrlCreateLabel("False", 80,50, 70, 18 )
 
 GUICtrlCreateLabel("Player Facing:", 5, 75, 95, 50)
dim $ctrlplayerfacing = GUICtrlCreateLabel("0", 80,75, 70, 18 )

GUISetState()

Global $WinTitle = "World of Warcraft"

Global $Lite = ObjCreate("SERFLITEMAX20.Core.Main")
$Lite.StartFishing

while not $Lite.HasStarted
wend

WinActivate($WinTitle)
WinWaitActive($WinTitle)

sleep(3000)

while True
	 
	GUICtrlSetData($ctrldistance,$Lite.TargetDistance)
	GUICtrlSetData($ctrlfacing,$Lite.TargetTurnAmount)
	GUICtrlSetData($ctrltest,$Lite.HostilesInLOSAndAttackable)
	GUICtrlSetData($ctrlplayerfacing,$Lite.PlayerFacing)
	 sleep(100)
wend
 
Exit

 


func terminate()
    sleep(100)
 
;send("{a up}")
        exit 0
EndFunc ;==>Terminate